package com.wrial.face.tencent;
/*
 * @Author  Wrial
 * @Date Created in 20:10 2020/8/23
 * @Description
 */

import java.util.LinkedList;
import java.util.Scanner;

public class Delete {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = scanner.nextInt();
        int k = scanner.nextInt();
        for (int i = 0; i < count; i++) {
            int temp = scanner.nextInt();
            if (i==k-1)continue;
            System.out.print(temp+" ");
        }

    }
}
